<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<JS href="../Public/js/jquery.js" />
<JS href="../Public/js/My97DatePicker/WdatePicker.js" />

<style>
.guoqi{color:#f00;}
.n3{color:#f0f;}
.n7{color:#0f0;}
span{margin:10px; }
.b{font-weight:bold;}
</style>
<script>
now = '{$now}';
d = 60*60*24;
$().ready(function(){
	$('.date').each(function(data){
		times = $(this).attr('date');
		st = times - now
		if(st <0)
			{
			$(this).addClass('guoqi');
			}
		else if(st >=0 && st < d*3)
			{
			$(this).addClass('n3');
			}
		else if(st >= d*3 && st<d*7)
			{
			$(this).addClass('n7');
			}
		
		
	})
	
	
	
})


function edit(id)
{
	window.location.href="{$editurl}/id/"+id;	
	
}
function del(id)
{
	if(confirm('此操作会将此记录彻底从系统中删除！并且无法恢复。\n确定继续？'))
		{
			$.post('{$delurl}',
			{'id':id},
				function(data){
				eval('data='+data);
				if(data.state == 1)
				{
					window.location.reload();
				}else
				{
					alert(data.msg);
				}
			})
	}
}

</script>
</head>
<body>

<div>

<div class="tit">
<fieldset>
<legend>查询窗口</legend>
<form action="__ACTION__" id="form">
栏目：<select name="class" onchange="$('#form').submit()">
<option value="0">请选择栏目..</option>
<volist name="class" id="vo">
<option value="{$vo.id}" <eq name="vo.id" value="$Think.get.class"> selected="selected" </eq> >{$vo.classname}</option>
</volist>
</select>
<span>网站名称：<input type="text" name="webname" value="{.webname}"/></span>
<span>网址：<input type="text" name="weburl" value="{.weburl}" /></span> 
<span>联系方式：<input type="text" name="contact" value="{.contact}" /></span>
<span>显示所有信息:<input type="checkbox" name="vlid"  <eq name="Think.get.vlid" value="on" > checked="checked" </eq>/></span>

<p></p>
<span>到期时间:<select name="q_d" onchange="$('#form').submit()"><option value="-1">快速选择到期时间</option>
<option value="0" <eq name="Think.get.q_d" value="0">selected="selected" </eq>>已经过期</option>
<option value="3" <eq name="Think.get.q_d" value="3">selected="selected" </eq>>3天内到期</option>
<option value="7" <eq name="Think.get.q_d" value="7">selected="selected" </eq>>7天内到期</option>
<option value="15" <eq name="Think.get.q_d" value="15">selected="selected" </eq>>15天内到期</option>
</select><input type="text" name="expiration1" value="{.expiration1}" onClick="WdatePicker()" class="Wdate"/> - <input type="text" name="expiration2" value="{.expiration2}" onClick="WdatePicker()" class="Wdate" /></span>
<span>客服信息:<input type="text" name="servermsg" value="{.servermsg}" /></span>
<span>备注:<input type="text" name="notice" value="{.notice}" /></span>
<span><input type="submit" value="查询" /></span><span><input type="button" onclick="window.location.href='__ACTION__'" value="清空" /></span>
</form>
</fieldset><p>
<i>颜色值：
<span class="guoqi">已过期</span> 
<span class="n3">3天过期</span> 
<span class="n7">7天过期</span></i></p>
</div>


<div class="content">
<table border="1" bordercolor="#333" cellpadding="5"  cellspacing="0"><tr><td>id</td><td>栏目名称</td><td>网站名称</td><td>网址</td><td>金额</td><td>联系方式</td><td>到期时间</td><td>客服信息</td><td>备注</td><td>&nbsp;</td><td>操作</td><tr>
<volist name="list" id="vo">
<tr><td>{$vo.id}</td><td>{$vo.classname}</td><td>{$vo.linkname|str_replace=',','<br />',###}</td><td>{$vo.linkurl|str_replace=',','<br />',###}</td>
<td>{$vo.money}/月</td><td>{$vo.contact}</td><td class="date" date="{$vo.expiration}">{$vo.expiration|date='Y-m-d',###}</td><td>{$vo.servermsg}</td><td>{$vo.notice}</td>
<td><eq name="vo.vlid" value="0">有效<else/><font color="red">无效</font></eq><td><input type="button" onclick="edit('{$vo.id}')" value="改" /><input type="button" onclick="del('{$vo.id}')" value="删" /><a href="{$renewurl}/id/{$vo.id}">续</a> <a href="__URL__/moneylist/mid/{$vo.id}">历史消费</a></td></tr>	
</volist>
</table>
<div class="page">{$page}</div>
<a href="{$addurl}">添加新信息</a>
</div>


</div>



</body>
</html>